<template>
  <div class="about">
    <div>我是A模块的数据{{numberA}}</div>
    <div>我是b模块的数据{{numberB}}</div>
    <button @click="addA">A模块++</button>
    <button @click="addB">B模块++</button>
  </div>
</template>
<script>
import { mapState,mapMutations } from 'vuex';
export default {
  computed:{
    ...mapState({
      numberA: state => state.a.number,
      numberB: state => state.b.number
    })
  },
  methods: {
    ...mapMutations({
      addA: 'a/add',
      addB: 'b/add'
    })
  },
}
</script>
